$(function () {
   var count = $("#checkDetailCount").val();
   $("#checkDetailCounts").text(count);
   $("#selectedChecked").text(count);
    init_detailList();
});

/**初始化详情列表*/
function init_detailList(){
    var settings = {
        url: ctx + "myCustomer/checkCusByMobile",
        pageSize: 10,
        queryParams: function(params) {
            return {
                pageSize: params.limit,
                pageNum: params.offset / params.limit + 1,
                mobile:$("#checkDetailMobile").val()
            };
        },
        columns: [{
            field: 'nickname',
            class:'text-center',
            title: '客户名',
            formatter:function (value,row,index) {
                if(value.length>5){
                    return value.substring(0,5)+"...";
                }else{
                    return value;
                }
            }
        }, {
            field: 'createtime',
            class:'text-center',
            title: '创建时间',
            formatter:function (value,row,index) {
                return value.substring(0,14);
            }
        }, {
            field: 'dept',
            class:'text-center',
            title: '部门'
        },{
            field: 'receiver',
            class:'text-center',
            title: '跟进人'
        },{
            field: null,
            class:'text-center',
            title: '操作',
            formatter:function (value,row,index) {
                var type = row.types;
                var uuid = row.id;
                return "<a href='javascript:void(0)' onclick='viewMycusDetail(this)' data-type='"+type+"' data-id='"+uuid+"' >查看详情</a>";
            }
        },{
            field: null,
            class:'text-center',
            title: '是否合并'
        }],
    };
    $JuXue.initTable('ckeckDetailTab', settings);
}